# -*- coding: utf-8 -*-
"""
Created on Thu Sep 19 10:58:43 2019

@author: Administrator
"""

# 1030 完美数列
# 分析：题目要求从数列中选择尽可能多的数构成完美数列，
# 因此数列个数从大到小，只要有一个数列满足即可
# def is_perfect：判断是否完美
"""
def test():
    num, factor = input().split(' ')
    num = int(num)
    factor = int(factor)
    raw = input().split(' ')
    data = [int(ele) for ele in raw]
    
    while num != 0:
        seq_list = generate(data, num)
        for seq in seq_list:
            if is_perfect(seq, factor) == True:
                print(num)
                return
        num = num - 1
        
def is_perfect(seq, factor):
    max_value = 0
    min_value = float('inf')
    
    for s in seq:
        if s > max_value:
            max_value = s
        if s < min_value:
            min_value = s
            
    if max_value <= min_value * factor:
        return True
    return False

#seq = [1,2,3,4]
#print(is_perfect(seq, 3))
#以data数列为源数据，生成num个数的数列list
def generate(data, num):
    result = []
    length = len(data)
    if length == num:
        result.append(data)
        return result
    for i in range(length-num+1):
        result.append(data[i:i+num])
    return result
#data = [1,2,3,4,5]
#print(generate(data, 2))
test()
"""
# 非零返回
def test():
    num, factor = input().split(' ')
    num = int(num)
    factor = int(factor)
    raw = input().split(' ')
    data = [int(ele) for ele in raw]
    
    data.sort()
    
    step = 1
    for i in range(num):
        j = i + step
        while j < num:
            if data[j] <= factor * data[i]:
                step = j - i + 1
                j = j + 1
            else:
                break
    print(step)
test()